/****************************************************************************
**
** MainGump.h
**
** Copyright (C) August 2014 Hotride
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
**
*****************************************************************************
*/
//---------------------------------------------------------------------------
#ifndef MainGumpH
#define MainGumpH
//---------------------------------------------------------------------------
class TMainGump
{
private:
	bool m_SavePassword;
	bool m_SelectedAccount;
	
	int m_AccountPos;
	int m_PasswordPos;
	
	string m_Account;
	string m_Password;

	DWORD m_LastArrowTick;
	bool m_ArrowLighted;
	
	TEXT_TEXTURE_HEADER m_TextureLogin;
	TEXT_TEXTURE_HEADER m_TextureAccount;
	TEXT_TEXTURE_HEADER m_TexturePassword;
	TEXT_TEXTURE_HEADER m_TextureSavePassword;
	TEXT_TEXTURE_HEADER m_TextureAutoLogin;

public:
	TMainGump();
	~TMainGump();

	SETGET(string, Account)
	SETGET(string, Password)
	SETGET(bool, SavePassword)
	SETGET(int, AccountPos)
	SETGET(int, PasswordPos)
	
	void InsertAccount(char *c);
	void InsertPassword(char *c);
	
	void Init();

	int Render(bool mode);
	
	void ParseLeftMouseDown();
	void ParseLeftMouseUp();
	void ParseRightMouseDown();
	void ParseRightMouseUp();
	bool ParseLeftMouseDoubleClick();
	bool ParseRightMouseDoubleClick();
	void ParseMouseWheel(MOUSE_WHEEL_STATE state);
	void ParseCharPress(WPARAM wparam, LPARAM lparam);
	void ParseKeyPress(WPARAM wparam, LPARAM lparam);
};
//---------------------------------------------------------------------------
#endif